package com.xqboss.apps.dto.marketing;

import com.xqboss.apps.enums.box.BoxSequenceEnum;
import com.xqboss.apps.enums.marketing.AirdropUserTypeEnum;
import com.xqboss.apps.enums.nft.NftTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *     添加空投
 * </p>
 * @author Trent
 * @date 2023/9/1
 */
@Data
@ApiModel
public class AddAirdropDto {

    @ApiModelProperty(value = "藏品/装备/箱子 ID", required = true)
    private Long sourceId;

    @ApiModelProperty(value = "空投原因", required = true)
    @NotNull(message = "请输入空投原因")
    private String reason;

    @ApiModelProperty(value = "空投时间", required = true)
    @NotNull(message = "请输入空投时间")
    private LocalDateTime airdropTime;

    @ApiModelProperty(value = "空投用户列表", required = true)
    @NotNull(message = "请输入空投用户列表")
    @Size(min = 1, message = "至少空投给一个用户")
    private List<String> userList;

    @ApiModelProperty(value = "用户列表类型",required = true)
    @NotNull(message = "请输入用户列表类型")
    private AirdropUserTypeEnum userType;

    @ApiModelProperty(value = "空投类型",required = true)
    @NotNull(message = "请输入空投类型")
    private NftTypeEnum airdropType;

    @ApiModelProperty(value = "数量",required = true)
    @Min(value = 1, message = "最小值为1")
    private Integer quantity;

    /*这儿的顺序是指当给用户投递多个藏品或装备时，对应的number_value_str是有序还是无序的；下面的枚举就没新建了，直接使用箱子空投的随机或顺序两个字段标识*/
    @ApiModelProperty(value = "藏品|装备空投顺序（争对箱子不生效）",required = true)
    private BoxSequenceEnum nftSequence;
}
